package com.lingx.model.impl;

import com.alibaba.fastjson.annotation.JSONField;
import com.lingx.model.annotation.FieldModelConfig;

public class DefaultConfig extends AbstractModel{

	private static final long serialVersionUID = 2980708348657141320L;
	
	public DefaultConfig() {
		this.setCode("config");
		this.setName("常规配置");
		this.setIconCls("el-icon-document");
		this.setModelType("Config");
	}
	@FieldModelConfig(sort="9",name="行数")
	private Integer pageSize=20;
	@FieldModelConfig(sort="A",name="排序字段")
	private String sortName="id";
	@FieldModelConfig(sort="B",name="排序方式")
	private String sortOrder="desc";

	@JSONField(serialize=false)
	@FieldModelConfig(sort="F",name="数据权限")
	private String dataAuth="";

	@JSONField(serialize=false)
	@FieldModelConfig(sort="I",name="查询配置",inputType="string")
	private String queryField;

	@JSONField(serialize=false)
	@FieldModelConfig(sort="I0",name="级联配置",inputType="string")
	private String cascade;
	@FieldModelConfig(sort="J",name="双击操作",inputType="string")
	private String dblclickMethod="view";
	@FieldModelConfig(sort="K",name="双击窗体样式",inputType="string",editor="combobox",editorParams="option:CTYS" )
	private String winStyle="default";

	@FieldModelConfig(sort="M",name="行操作栏宽度",inputType="string")
	private Integer operateWidth=0;
	
	@FieldModelConfig(sort="N",name="表格刷新按钮",inputType="string",editor="boolean")
	private Boolean refreshButton=false;
	public Integer getOperateWidth() {
		if(operateWidth==null)operateWidth=0;
		return operateWidth;
	}
	public void setOperateWidth(Integer operateWidth) {
		this.operateWidth = operateWidth;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public String getSortName() {
		return sortName;
	}
	public void setSortName(String sortName) {
		this.sortName = sortName;
	}
	public String getSortOrder() {
		return sortOrder;
	}
	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder;
	}
	public String getQueryField() {
		return queryField;
	}
	public void setQueryField(String queryField) {
		this.queryField = queryField;
	}
	public String getDblclickMethod() {
		return dblclickMethod;
	}
	public void setDblclickMethod(String dblclickMethod) {
		this.dblclickMethod = dblclickMethod;
	}
	public String getWinStyle() {
		return winStyle;
	}
	public void setWinStyle(String winStyle) {
		this.winStyle = winStyle;
	}
	public String getDataAuth() {
		return dataAuth;
	}
	public void setDataAuth(String dataAuth) {
		this.dataAuth = dataAuth;
	}
	public String getCascade() {
		return cascade;
	}
	public void setCascade(String cascade) {
		this.cascade = cascade;
	}
	public Boolean getRefreshButton() {
		if(refreshButton==null)return false;
		return refreshButton;
	}
	public void setRefreshButton(Boolean refreshButton) {
		this.refreshButton = refreshButton;
	}

}
